import 'package:flutter/cupertino.dart';
import 'package:flutter_app/BaseMaterialWidget.dart';
import 'package:toast/toast.dart';

class CupertinoStyleDemo extends BaseMaterialWidget {
  @override
  Widget buildContent(BuildContext context) {
    return ListView(
      children: <Widget>[
        CupertinoActivityIndicator(
          radius: 20,
        ),
        CupertinoAlertDialog(
          title: Text('对话框'),
          content: SingleChildScrollView(
            child: ListBody(
              children: <Widget>[Text('确定使用IOS风格对话框吗？')],
            ),
          ),
          actions: <Widget>[
            CupertinoDialogAction(
              child: Text(
                '确定',
              ),
              onPressed: () {
                Toast.show("确定", context);
              },
            ),
            CupertinoDialogAction(
              child: Text('取消'),
              onPressed: () {
                Toast.show('去掉', context);
              },
            )
          ],
        )
      ],
    );
  }

  @override
  String getTitle() {
    return 'CupertinoStyleDemo';
  }
}
